import request from "@/utils/request";

export function field_save(data) {
  return request({
    url: "/field/save",
    method: "post",
    data: data
  });
}

export function images_delete(data) {
  return request({
    url: "/images/delete",
    method: "post",
    data: data
  });
}

export function goods_getGoods(data) {
  return request({
    url: "/goods/getGoods",
    method: "post",
    data: data
  });
}

export function setting_company(data) {
  return request({
    url: "/setting/company",
    method: "post",
    data: data
  });
}

// 微信模板消息设置请求
export function company_sendMessage(data) {
  return request({
    url: "/setting/company_sendMessage",
    method: "post",
    data: data
  });
}

export function goods_getGoodsSpu(params) {
  return request({
    url: "/goods/getGoodsSpu",
    method: "get",
    params
  });
}

// 获取所有的商品spu
export function goods_getAllGoodsSpu(params) {
  return request({
    url: "/goods/getAllGoodsSpu",
    method: "get",
    params
  });
}

// 获取所有的商户
export function user_getAllUser(params) {
  return request({
    url: "/user/getCompany",
    method: "get",
    params
  });
}
// 获取所有用户
export function member_getMembers(params) {
  return request({
    url: "/member/getMembers",
    method: "get",
    params
  });
}

// 分拣时获取用户
export function sort_getMembers(data) {
  return request({
    url: "/sorting/search_date_user",
    method: "post",
    data: data
  });
}

// 获取未支付佣金账单
export function unpaid_order(params) {
  return request({
    url: "/unpaidOrder",
    method: "get",
    params
  });
}

//获取批次商品
export function purchase_Batch(params) {
  return request({
    url: "/batch/getBatch",
    method: "get",
    params
  });
}

//请求商品品牌
export function goods_likeData(data) {
  return request({
    url: "/goods/likeData",
    method: "post",
    data: data
  });
}

const upload_img_shop = process.env.VUE_APP_BASE_API + "/poster/upload";
const uploadPath = process.env.VUE_APP_BASE_API + "/upload/upload_file";
const upload_img = process.env.VUE_APP_BASE_API + "/upload/upload_img";
const puzzleImg =
  "https://caidj-image.oss-cn-beijing.aliyuncs.com/item/2009/22/ESG4OJFsyRc9qJ6VakNGQmiL8tXTqRzWh2VSPTcT.png";

// sku维护
const skuimport = process.env.VUE_APP_BASE_API + "/import/import_sku ";
// 分组报价
const group_price_import =
  process.env.VUE_APP_BASE_API + "/import/import_group_price";
// 导入订单
const order_import = process.env.VUE_APP_BASE_API + "/import/import_order";
// 导入商品
const goods_import = process.env.VUE_APP_BASE_API + "/import/import_goods";
// 导入用户
const user_import = process.env.VUE_APP_BASE_API + "/import/import_user";
// 导入周期报价
// const user_cycle_export =
//   process.env.VUE_APP_BASE_API + "/user_cycle_export/import_cycle";
const user_cycle_export =
  process.env.VUE_APP_BASE_API + "/import_user_cycle/import_cycle";

//导入期初库存
const warehouse_stock_import = process.env.VUE_APP_BASE_API + "/opening/import";

// 公众号域名验证
const uploadTxt = process.env.VUE_APP_BASE_API + "/uploadTxt";

// 导入库存盘点单
const inventory_import =
  process.env.VUE_APP_BASE_API + "/inventorySheet/import";

export {
  uploadPath,
  upload_img,
  puzzleImg,
  skuimport,
  upload_img_shop,
  group_price_import,
  order_import,
  goods_import,
  user_import,
  user_cycle_export,
  inventory_import,
  uploadTxt,
  warehouse_stock_import
};
